package com.composite.pattern;

import lombok.Getter;

/**
 * @author chenchen
 * @description
 * @date 2023/11/10 13:41
 */
@Getter
public abstract class Component {

    private final String name;
    private final String describe;

    public Component(String name, String describe) {
        this.name = name;
        this.describe = describe;
    }

    /**
     * @description 显示方法
     * @author chenchen
     * @date 2023/11/10 13:44
     * @param
     * @return void
     */
    public abstract void show();

    /**
     * @description 新增方法
     * @author chenchen
     * @date 2023/11/10 13:43
     * @param component
     * @return void
     */
    public void add(Component component) {
        throw new UnsupportedOperationException();
    }

    /**
     * @description 删除方法
     * @author chenchen
     * @date 2023/11/10 13:43
     * @param component
     * @return void
     */
    public void remove(Component component) {
        throw new UnsupportedOperationException();
    }

}
